﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace LoveEat.MODEL.WeChat
{
    [Serializable]
    [DataContract]
    public class OAuthToken
    {
        /// <summary>
        ///     网页授权接口调用凭证,注意：此access_token与基础支持的access_token不同
        /// </summary>
        [DataMember(Name = "access_token")]
        [Display(Name = "网页授权接口调用凭证")]
        public string access_token { get; set; }

        /// <summary>
        ///     接口调用凭证超时时间，单位（秒）
        /// </summary>
        [DataMember(Name = "expires_in")]
        [Display(Name = "接口调用凭证超时时间")]
        public string expires_in { get; set; }

        /// <summary>
        ///     接口调用凭证超时时间，单位（秒）
        /// </summary>
        [DataMember(Name = "refresh_token")]
        [Display(Name = "用户刷新access_token")]
        public string refresh_token { get; set; }

        /// <summary>
        ///     用户唯一标识，请注意，在未关注公众号时，用户访问公众号的网页，也会产生一个用户和公众号唯一的OpenID
        /// </summary>
        [DataMember(Name = "openid")]
        [Display(Name = "用户唯一标识")]
        public string openid { get; set; }

        /// <summary>
        ///     用户授权的作用域，使用逗号（,）分隔
        /// </summary>
        [DataMember(Name = "scope")]
        [Display(Name = "用户授权的作用域")]
        public string scope { get; set; }
    }
}